package com.rabbiter.oes.mapper;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.rabbiter.oes.entity.Replay;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 留言回复信息
 */
@Mapper
public interface ReplayMapper extends BaseMapper<Replay> {
    default List<Replay> findAllByMessageId(Integer messageId) {
        LambdaQueryWrapper<Replay> wrapper = Wrappers.lambdaQuery(Replay.class).eq(Replay::getMessageId, messageId);
        return selectList(wrapper);
    }
}
